// import { applyMiddleware, createStore } from 'redux'
// import { composeWithDevTools } from 'redux-devtools-extension'
// import thunk from 'redux-thunk'

// import reducers from './reducers'

// const store = createStore(reducers, composeWithDevTools(applyMiddleware(thunk)))

// export default store
import { configureStore } from '@reduxjs/toolkit'
import LoginReducer from './reducers/login'
import profileReducer from './reducers/profile'
import homeReducer from './reducers/home'
import articleReducer from './reducers/article'
import searchReducer from './reducers/search'
export const store = configureStore({
  reducer: {
    loginer:LoginReducer,
    profileer:profileReducer,
    homer:homeReducer,
    articler:articleReducer,
    searcher:searchReducer,
  },
})

// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch
